<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="/Public/favicon.ico" >
<LINK rel="Shortcut Icon" href="/Public/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="/Public/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="/Public/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="/Public/lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<link href="/Public/css/style.css" rel="stylesheet" type="text/css" />
<script src="/Public/laydate/laydate.js"></script>

<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>建档</title>
</head>
<body>

<form class="form form-horizontal registerform" action="" id="form-mortgage-alert" method="post">
<input type="hidden" name="doc_id" id="doc_id"  value="<?php echo ($documentlist["doc_id"]); ?>">
<table class="table table-border table-bordered table-bg jd" style="width:95%; margin:20px auto; overflow:hidden;">
  <!--建档-->
  <tr>
    <td>产品类型</td>
    <td>
        <div class="user-sex"> 
      <ul>
        <li class="sex"><input name="doc_type" value="1" type="radio" <?php if($documentlist['doc_type'] == '1'): ?>checked<?php endif; ?>/><label for="sex-man">急下款</label></li>
        <li class="sex"><input name="doc_type" value="2" type="radio" <?php if($documentlist['doc_type'] == '2'): ?>checked<?php endif; ?>/><label for="sex-man">快易贷</label></li>
        <li class="sex"><input name="doc_type" value="3" type="radio" <?php if($documentlist['doc_type'] == '3'): ?>checked<?php endif; ?>/><label for="sex-man">尾款垫资</label></li>
        <li class="sex"><input name="doc_type" value="4" type="radio" <?php if($documentlist['doc_type'] == '4'): ?>checked<?php endif; ?>/><label for="sex-man">赎楼解押</label></li>
        <li class="sex"><input name="doc_type" value="5" type="radio" <?php if($documentlist['doc_type'] == '5'): ?>checked<?php endif; ?>/><label for="sex-man">直通车</label></li>
        <li class="sex"><input name="doc_type" value="6" type="radio" <?php if($documentlist['doc_type'] == '6'): ?>checked<?php endif; ?>/><label for="sex-man">易审通</label></li>
        <li>需要天数：<input name="needday" value="<?php echo ($documentlist['need_day']); ?>" type="text" class="input-text kk" style=" width:80px;"/>&nbsp;天</li>
        <li><a  onclick="huanyuan(this,'<?php echo ($documentlist["doc_id"]); ?>')" title="还原" style="color:red">还原</a></li>
      </ul>
      </div>
      
    </td>
  </tr>
  <?php
 if(strstr($user_auth['level'],"26") && $documentlist['state']=='0' && $chargelist['certificate_time']=='' || (strstr($user_auth['level'],"43")&&$documentlist['state']!='2'&&$chargelist['certificate_time']=='') ){ ?>
  <tr>
    <td width="120">买方信息</td>
    <td>
    <ul>
    <li>姓名<input type="text" name="buy_name" id="buy_name" value="<?php echo ($documentlist["buy_name"]); ?>" class="input-text kk" style=" width:120px" required='true' ></li>
    <li>身份证号<input datatype="idcard" nullmsg="请填写身份证号码！" errormsg="您填写的身份证号码不对！"  required='true' type="text" name="buy_card" id="buy_card"  value="<?php echo ($documentlist["buy_card"]); ?>" class="input-text kk card" style=" width:180px;"></li>
    <li><div class="Validform_checktip"></div></li>
    <li>建档时间<input class="input-text kk" onClick="laydate()"  required='true' name="create_time" <?php if($documentlist['create_time'] != ''): ?>value="<?php echo (date("Y-m-d",$documentlist["create_time"])); ?>"<?php endif; ?> style=" width:100px"></li>
    <li>单位性质<input type="text" name="nature" id="nature"   required='true' value="<?php echo ($extendlist["nature"]); ?>" class="input-text kk" style=" width:180px;"></li>
    <li>手机号码<input datatype="mobile"  errormsg="手机号码格式不对！"  required='true' type="text" name="buy_phone" id="buy_phone"  value="<?php echo ($extendlist["buy_phone"]); ?>" class="input-text kk  card" style=" width:120px"></li>
    <li style="height:47px"><div class="Validform_checktip"></div></li>
    <li>家庭电话<input type="text" name="buy_tel" id="buy_tel"    required='true' value="<?php echo ($extendlist["buy_tel"]); ?>" class="input-text kk" style=" width:120px"></li>
    <li>工作单位<input type="text" name="buy_work" id="buy_work"   required='true' value="<?php echo ($extendlist["buy_work"]); ?>" class="input-text kk" style=" width:240px;"></li>
    <li>单位电话<input type="text" name="buy_work_tel" id="buy_work_tel"   required='true' value="<?php echo ($extendlist["buy_work_tel"]); ?>" class="input-text kk" style=" width:120px"></li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>买方配偶信息</td>
    <td>
    <ul>
    <li>姓名<input type="text" name="buy_spouse_name" id="buy_spouse_name"   value="<?php echo ($extendlist["buy_spouse_name"]); ?>" class="input-text kk" style=" width:120px"></li>
    <li>身份证号<input  datatype="idcard" errormsg="您填写的身份证号码不对！"   ignore="ignore"  type="text" name="spouse_card" id="spouse_card"  value="<?php echo ($documentlist["spouse_card"]); ?>" class="input-text kk  card" style=" width:180px"></li>
    <li ><div class="Validform_checktip"></div></li>
    <li>手机号码<input datatype="mobile" ignore="ignore"  type="text"   name="buy_spouse_tel" id="buy_spouse_tel"  value="<?php echo ($extendlist["buy_spouse_tel"]); ?>" class="input-text kk  card" style=" width:120px"></li>
    <li style="height:47px"><div class="Validform_checktip"></div></li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>卖方信息</td>
    <td>
     <ul>
    <li>姓名<input type="text" name="sell_name" id="sell_name"   required='true' value="<?php echo ($documentlist["sell_name"]); ?>" class="input-text kk" style=" width:120px"></li>
    <li>手机号码<input datatype="mobile" errormsg="手机号码格式不对！"  required='true' type="text" name="sell_phone" id="sell_phone"  value="<?php echo ($extendlist["sell_phone"]); ?>" class="input-text kk  card" style=" width:180px"></li>
    <li style="height:47px"><div class="Validform_checktip"></div></li>
    <li> 家庭电话<input type="text" name="sell_tel" id="sell_tel"   required='true' value="<?php echo ($extendlist["sell_tel"]); ?>" class="input-text kk" style=" width:120px"></li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>贷款信息</td>
    <td>
    <ul>
    <li>公积金<input name="account_type" type="radio"   value="1" <?php if($extendlist['account_type'] == 1): ?>checked<?php endif; ?> class="kk">省行<input name="account_type" type="radio" value="2" <?php if($extendlist['account_type'] == 2): ?>checked<?php endif; ?> class="kk">市行<input type="text" name="account_amount" id="account_amount"  value="<?php echo ($extendlist["account_amount"]); ?>" class="input-text kk one" style=" width:100px">万元<span class="fonnt01">（如有公积金，请选择公积金类型）</span></li>
    <li>商业<input type="text" name="business_amount" id="business_amount"  value="<?php echo ($extendlist["business_amount"]); ?>" class="input-text kk two" style=" width:100px">万元</li>
    <li>贷款总金额<input type="text" name="total_amount"  required='true' id="total_amount"  value="<?php echo ($documentlist["amount"]); ?>" class="input-text kk three" style=" width:100px">万元</li>
    <li>贷款年限<input type="text" name="loan_year"  required='true' id="loan_year"  value="<?php echo ($extendlist["loan_year"]); ?>" class="input-text kk" style=" width:100px">年</li>
    </ul>
    <ul>
    <li>贷款银行
      <select name="bank_id" class="select2 kk"  required='true' >
        <?php if(is_array($banks)): $i = 0; $__LIST__ = $banks;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$banks): $mod = ($i % 2 );++$i;?><option <?php if($documentlist['bank_id'] == $banks['bank_id']): ?>selected="selected"<?php endif; ?> value="<?php echo ($banks["bank_id"]); ?>"><?php echo ($banks["bank_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
    </select>
  </li>
     <li>备注<input type="text" name="loan_remark" id="loan_remark"  value="<?php echo ($extendlist["loan_remark"]); ?>" class="input-text kk" style=" width:500px"></li>
    </ul>
     <ul>
    <li>监管类型
    <input name="supervise" <?php if($documentlist['supervise'] == 1): ?>checked<?php endif; ?> type="radio" value="1" class="kk">贷款监管
    <input name="supervise" <?php if($documentlist['supervise'] == 2): ?>checked<?php endif; ?> type="radio" value="2" class="kk">全款监管
    <input name="supervise" <?php if($documentlist['supervise'] == 3): ?>checked<?php endif; ?> type="radio" value="3" class="kk">不监管
    </li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>房屋信息</td>
    <td>
    <ul>
    <li>地址<input type="text"  required='true' name="address" id="address"  value="<?php echo ($documentlist["address"]); ?>" class="input-text kk" style=" width:280px"></li>
    <li><input  required='true' name="area"  required='true' value="1" type="radio" <?php if($documentlist['area'] == '1'): ?>checked<?php endif; ?> >市区
    <input  required='true' name="area" value="2" type="radio" <?php if($documentlist['area'] == '2'): ?>checked<?php endif; ?> >江宁
    <input  required='true' name="area" value="3" type="radio" <?php if($documentlist['area'] == '3'): ?>checked<?php endif; ?> >江北</li></li>
    <li>面积<input  required='true' type="text" name="house_area" id="house_area"  value="<?php echo ($extendlist["house_area"]); ?>" class="input-text kk" style=" width:100px">平方米</li>
    <li>建筑年代<input  required='true' type="text" name="house_age" id="house_age"  value="<?php echo ($extendlist["house_age"]); ?>" class="input-text kk" style=" width:100px">年</li>
    <li>房屋总价<input  required='true' type="text" name="house_total" id="house_total"  value="<?php echo ($extendlist["house_total"]); ?>" class="input-text kk" style=" width:100px">万元</li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>中介公司</td>
    <td>
    <ul>
    <li>公司名称
    <input  required='true' name="agent" type="text" value="<?php echo ($documentlist["agent_id"]); ?>" class="input-text kk" style=" width:220px" />
    </li>
    <li>门店
    <input  required='true' name="agentAddress" type="text" value="<?php echo ($extendlist["agent_address"]); ?>" class="input-text kk" style=" width:220px" />
    </li>
    <li>中介经办人<input  required='true' type="text" name="agent_name" id="agent_name"  value="<?php echo ($extendlist["agent_name"]); ?>" class="input-text kk  card" style=" width:120px"></li>
    <li>联系电话<input  required='true' datatype="mobile" errormsg="手机号码格式不对！" type="text" name="agent_tel" id="agent_tel"  value="<?php echo ($extendlist["agent_tel"]); ?>" class="input-text kk" style=" width:120px"></li>
    <li style="height:47px"><div class="Validform_checktip"></div></li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>营销人员</td>
    <td>
    <ul>
    <li>营销人
    <select name="market_id" class="select2 kk" style="width:200px" required='true' >
        <option value="<?php echo ($documentlist['market_id']); ?>"><?php echo ($marketname["user_name"]); ?></option>
      <?php if(is_array($marketlist)): $i = 0; $__LIST__ = $marketlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$marketlist): $mod = ($i % 2 );++$i;?><option <?php if($documentlist['market_id'] == $marketlist['user_id']): ?>selected="selected"<?php endif; ?> value="<?php echo ($marketlist["user_id"]); ?>"><?php echo ($marketlist["user_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
    </select>
    </li>
    <li>签单人<input type="text"  value="<?php echo ($signname["user_name"]); ?>" class="input-text kk" style=" width:200px" disabled="true"><input type="hidden" name="sign_id" id="sign_id"  value="<?php echo ($documentlist["sign_id"]); ?>"></li>
    </ul>
    </td>
  </tr>
<?php
} else{ ?>

<tr>
    <td width="120">买方信息</td>
    <td>
    <ul>
    <li>姓名：<?php echo ($documentlist["buy_name"]); ?></li>
    <li>身份证号：<?php echo ($documentlist["buy_card"]); ?></li>
    <li>建档时间：<?php echo (date("Y-m-d",$documentlist["create_time"])); ?></li>
    <li>单位性质：<?php echo ($extendlist["nature"]); ?></li>
    <li>手机号码：<?php echo ($extendlist["buy_phone"]); ?></li>
    <li>家庭电话：<?php echo ($extendlist["buy_tel"]); ?></li>
    <li>工作单位：<?php echo ($extendlist["buy_work"]); ?></li>
    <li>单位电话：<?php echo ($extendlist["buy_work_tel"]); ?></li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>买方配偶信息</td>
    <td>
    <ul>
    <li>姓名：<?php echo ($extendlist["buy_spouse_name"]); ?></li>
    <li>身份证号：<?php echo ($documentlist["spouse_card"]); ?></li>
    <li>手机号码：<?php echo ($extendlist["buy_spouse_tel"]); ?></li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>卖方信息</td>
    <td>
     <ul>
    <li>姓名：<?php echo ($documentlist["sell_name"]); ?></li>
    <li>手机号码：<?php echo ($extendlist["sell_phone"]); ?></li>
    <li> 家庭电话：<?php echo ($extendlist["sell_tel"]); ?></li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>贷款信息</td>
    <td>
    <ul>
    <li>公积金：
    <?php if($extendlist['account_type'] == 1): ?>省行<?php endif; ?>
    <?php if($extendlist['account_type'] == 2): ?>市行<?php endif; ?>
    <?php echo ($extendlist["account_amount"]); ?>万元</li>
    <li>商业：<?php echo ($extendlist["business_amount"]); ?>万元</li>
    <li>贷款总金额：<?php echo ($documentlist["amount"]); ?>万元</li>
    <li>贷款年限：<?php echo ($extendlist["loan_year"]); ?>年</li>
    </ul>
    <ul>
    <li>贷款银行：<?php echo ($mainbanks["bank_name"]); ?></li>
     <li>备注：<?php echo ($extendlist["loan_remark"]); ?></li>
    </ul>
     <ul>
    <li>监管类型：
    <?php if($documentlist['supervise'] == 1): ?>贷款监管<?php endif; ?>
    <?php if($documentlist['supervise'] == 2): ?>全款监管<?php endif; ?>
    <?php if($documentlist['supervise'] == 3): ?>不监管<?php endif; ?>
    </li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>房屋信息</td>
    <td>
    <ul>
    <li>地址：<?php echo ($documentlist["address"]); ?></li>
    <li>区域：
    <?php if($documentlist['area'] == '1'): ?>市区<?php endif; ?>
    <?php if($documentlist['area'] == '2'): ?>江宁<?php endif; ?>
    <?php if($documentlist['area'] == '3'): ?>江北<?php endif; ?>
    <li>面积：<?php echo ($extendlist["house_area"]); ?>平方米</li>
    <li>建筑年代：<?php echo ($extendlist["house_age"]); ?>年</li>
    <li>房屋总价：<?php echo ($extendlist["house_total"]); ?>万元</li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>中介公司</td>
    <td>
    <ul>
    <li>公司名称：<?php echo ($documentlist["agent_id"]); ?></li>
    <li>门店：<?php echo ($extendlist["agent_address"]); ?></li>
    <li>中介经办人：<?php echo ($extendlist["agent_name"]); ?></li>
    <li>联系电话：<?php echo ($extendlist["agent_tel"]); ?></li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>营销人员</td>
    <td>
    <ul>
    <li>营销人：<?php echo ($marketname["user_name"]); ?></li>
    <li>签单人：<?php echo ($signname["user_name"]); ?></li>
    </ul>
    </td>
  </tr>
<?php
} ?>


  <!--银行审核-->
  <?php
 if(strstr($user_auth['level'],"27") && $documentlist['state']!='2' && $chargelist['certificate_time']==''){ if(($user_auth['place']==$documentlist['place'] && $documentlist['turncity']=='0') || ($user_auth['place']==1 && ( $documentlist['turncity']=='1' || $documentlist['turncity']=='2') ) || strstr($user_auth['level'],"43")){ ?>
  <tr>
  <td width="120">银行审核</td>
  <td>
  <ul>
    <!-- <li>总行：<?php echo (getBankname($documentlist["bank_id"])); ?></li> -->
    <?php if($auditlist["bank_id"] == '' or $auditlist["bank_id"] == '0' or $user_auth['roleid'] == '4'): ?><li>贷款银行（支行）
      <select name="part_bank_id" class="select2 kk" style=" width:150px">
        <option value="">请选择</option>
        <?php if(is_array($bankslist)): $i = 0; $__LIST__ = $bankslist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$bankslist): $mod = ($i % 2 );++$i;?><option <?php if($auditlist['bank_id'] == $bankslist['bank_id']): ?>selected="selected"<?php endif; ?> value="<?php echo ($bankslist["bank_id"]); ?>"><?php echo ($bankslist["bank_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
      </select>
    </li>
    <?php else: ?>
    <li>贷款银行（支行）：<?php echo ($partbanks["bank_name"]); ?></li><?php endif; ?>
  <?php if($documentlist["loan"] == '' or $user_auth['roleid'] == '4'): ?><li>信贷员：
      <input type="text" name="loan" id="loan"  value="<?php echo ($documentlist["loan"]); ?>" class="input-text kk" style=" width:120px">
    </li>
    <?php else: ?>
    <li>信贷员：<?php echo ($documentlist["loan"]); ?></li><?php endif; ?>
  <li>银行送审日期：
    <?php
 if($documentlist['audit_time']=='' || $user_auth['roleid']==4){ ?>
    <input class="input-text kk" onClick="laydate()" name="audit_time" value="<?php if($documentlist["audit_time"] != ''): echo (date("Y-m-d",$documentlist["audit_time"])); endif; ?>" style=" width:100px">
    <?php
 }else{ ?>
      <?php echo (date("Y-m-d",$documentlist["audit_time"])); ?>
    <?php
 } ?>
  </li>
  <li>预计银行审批完成日期：
    <?php
 if($auditlist['plan_time']=='' || $user_auth['roleid']==4){ ?>
    <input class="input-text kk" name="plan_time"  value="<?php if($auditlist["plan_time"] != ''): echo (date("Y-m-d",$auditlist["plan_time"])); endif; ?>" onClick="laydate()" style=" width:100px">
    <?php
 }else{ ?>
      <?php echo (date("Y-m-d",$auditlist["plan_time"])); ?>
    <?php
 } ?>
  </li>
  </ul>


    <ul class="clear">
      <?php if(is_array($reason)): $i = 0; $__LIST__ = $reason;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><?php if($vo["creat_time"] != ''): echo (date("Y-m-d",$vo["creat_time"])); endif; ?> <?php echo (getBankname($vo["bank_id"])); ?>&nbsp;&nbsp;未通过原因:  <?php echo ($vo["content"]); ?>
        <?php
 if(strstr($user_auth['level'],"49")){ ?>
          <a onClick="article_edit('修改','<?php echo U('Index/reasonedit',array('id'=>$vo['reason_id']));?>',500,400)"  title="修改" style="color:red">修改</a>
          &nbsp;&nbsp;<a  onclick="article_del(this,'<?php echo ($vo["reason_id"]); ?>')" title="删除" style="color:red">删除</a>
          <?php
 } ?>
        </li><?php endforeach; endif; else: echo "" ;endif; ?>
      <?php if($documentlist["audit_finish"] == '' or $user_auth['roleid'] == '4'): ?><li><textarea name="reason" cols="" rows="" class="textarea"  placeholder="请填写此次银行审核未通过原因，若通过，请不要填写" style="width:600px;"></textarea>
        <input onClick="sendauditfalse(1)" id="sendauditfalsemessage" value="通知中介未通过原因" class="btn btn-secondary radius" type="button">
        <input onClick="tuian()" id="back" value="退案" class="btn btn-secondary radius" type="button">
      </li><?php endif; ?>
    </ul>


  <ul>
    <li>银行实际审核完成日期：
      <?php
 if($documentlist['audit_finish']=='' || $user_auth['roleid']==4){ ?>
      <input class="input-text kk" name="audit_finish" value="<?php if($documentlist["audit_finish"] != ''): echo (date("Y-m-d",$documentlist["audit_finish"])); endif; ?>" onClick="laydate()" style=" width:100px">
      <?php
 }else{ ?>
        <?php echo (date("Y-m-d",$documentlist["audit_finish"])); ?>
      <?php
 } ?>
    </li>
    <?php if(($documentlist["supervise"]) == "3"): ?><li><input onClick="sendaudit(1)" id="sendauditmessage" value="<?php if($auditlist["notice"] == '0'): ?>通知中介<?php else: ?>已通知中介<?php endif; ?>" class="btn btn-secondary radius" type="button"></li><?php endif; ?>
  </ul>

  </td>
  </tr>

  <?php
} else{ ?>
<tr>
  <td width="120">银行审核</td>
  <td>
  <ul>
  <li>贷款银行（支行）：<?php echo ($partbanks["bank_name"]); ?></li>
  <li>信贷员：<?php echo ($documentlist["loan"]); ?></li>
  <li>银行送审日期：<?php if($documentlist["audit_time"] != ''): echo (date("Y-m-d",$documentlist["audit_time"])); endif; ?></li>
  <li>预计银行审批完成日期：<?php if($auditlist["plan_time"] != ''): echo (date("Y-m-d",$auditlist["plan_time"])); endif; ?></li>
  </ul>
  <ul class="clear">
    <?php if(is_array($reason)): $i = 0; $__LIST__ = $reason;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><?php if($vo["creat_time"] != ''): echo (date("Y-m-d",$vo["creat_time"])); endif; ?> <?php echo (getBankname($vo["bank_id"])); ?>&nbsp;&nbsp;未通过原因:  <?php echo ($vo["content"]); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>

  </ul>
  <ul>
  <li>银行实际审核完成日期：<?php if($documentlist["audit_finish"] != ''): echo (date("Y-m-d",$documentlist["audit_finish"])); endif; ?></li>
  </ul>
  </td>
  </tr>
  <?php
} } else{ ?>
<tr>
  <td width="120">银行审核</td>
  <td>
  <ul>
  <li>贷款银行（支行）：<?php echo ($partbanks["bank_name"]); ?></li>
  <li>信贷员：<?php echo ($documentlist["loan"]); ?></li>
  <li>银行送审日期：<?php if($documentlist["audit_time"] != ''): echo (date("Y-m-d",$documentlist["audit_time"])); endif; ?></li>
  <li>预计银行审批完成日期：<?php if($auditlist["plan_time"] != ''): echo (date("Y-m-d",$auditlist["plan_time"])); endif; ?></li>
  </ul>
  <ul class="clear">
    <?php if(is_array($reason)): $i = 0; $__LIST__ = $reason;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><?php if($vo["creat_time"] != ''): echo (date("Y-m-d",$vo["creat_time"])); endif; ?> <?php echo (getBankname($vo["bank_id"])); ?>&nbsp;&nbsp;未通过原因:  <?php echo ($vo["content"]); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>

  </ul>
  <ul>
  <li>银行实际审核完成日期：<?php if($documentlist["audit_finish"] != ''): echo (date("Y-m-d",$documentlist["audit_finish"])); endif; ?></li>
  </ul>
  </td>
  </tr>
<?php
} ?>

<!--南房判断-->
<?php if($documentlist['supervise'] != '3'): if($chargelist['certificate_time']=='' && $documentlist['state']!='2' &&($user_auth['place']==$documentlist['place'] && $documentlist['turncity']=='0') || ($user_auth['place']==1 && ( $documentlist['turncity']=='1' || $documentlist['turncity']=='2') )){ ?>
<tr>
  <td width="120">南房</td>
  <td>
  <ul>
    <li>传前场日期：
      <?php
 if( (strstr($user_auth['level'],"45") && $extendlist['transfer_time']=='') || strstr($user_auth['level'],"43") ){ ?>
      <input class="input-text kk" onClick="laydate()" name="transfer_time" value="<?php if($extendlist["transfer_time"] != ''): echo (date("Y-m-d",$extendlist["transfer_time"])); endif; ?>" style=" width:100px">
      <?php
 }else{ ?>
      <?php echo (turnTime($extendlist["transfer_time"])); ?>
      <?php
 } ?>
    </li>
    <li>实际过户时间：
      <?php
 if( ($documentlist['sign_id']==$user_auth['userid'] && $extendlist['transfer_real_time']=='') || strstr($user_auth['level'],"43") ){ ?>
      <input class="input-text kk" onClick="laydate()" name="transfer_real_time" value="<?php if($extendlist["transfer_real_time"] != ''): echo (date("Y-m-d",$extendlist["transfer_real_time"])); endif; ?>" style=" width:100px">
      <?php
 }else{ ?>
      <?php echo (turnTime($extendlist["transfer_real_time"])); ?>
      <?php
 } ?>
    </li>
    <li>出件日期：
      <?php
 if( (strstr($user_auth['level'],"51") && $extendlist['transfer_time']=='') || strstr($user_auth['level'],"43") ){ ?>
      <input class="input-text kk" onClick="laydate()" name="certificate_time" value="<?php if($extendlist["certificate_time"] != ''): echo (date("Y-m-d",$extendlist["certificate_time"])); endif; ?>" style=" width:100px">
      <?php
 }else{ ?>
      <?php echo (turnTime($extendlist["certificate_time"])); ?>
      <?php
 } ?>
    </li>
  </ul>
  </td>
</tr>
<?php
}else{ ?>
<tr>
  <td width="120">南房</td>
  <td>
    <ul>
      <li>传前场日期：<?php if($extendlist["transfer_time"] != ''): echo (date("Y-m-d",$extendlist["transfer_time"])); endif; ?></li>
      <li>实际过户时间：<?php if($extendlist["transfer_real_time"] != ''): echo (date("Y-m-d",$extendlist["transfer_real_time"])); endif; ?></li>
      <li>出件日期：<?php if($extendlist["certificate_time"] != ''): echo (date("Y-m-d",$extendlist["certificate_time"])); endif; ?></li>
    </ul>
  </td>
</tr>
<?php
} endif; ?>


  <?php
 if(strstr($user_auth['level'],"29") && $documentlist['state']!='2' && $chargelist['certificate_time']==''){ if(($user_auth['place']==$documentlist['place'] && $documentlist['turncity']=='0') || ($user_auth['place']==1 && ( $documentlist['turncity']=='1' || $documentlist['turncity']=='2') ) || strstr($user_auth['level'],"43")){ ?>
  <tr>
  <td width="120">不动产证</td>
  <td>
  <ul>
  <li>不动产证出件日期:
    <?php
 if($extendlist['estate_time']=='' || $user_auth['roleid']==4){ ?>
    <input class="input-text kk" onClick="laydate()" name="estate_time" value="<?php if($extendlist["estate_time"] != ''): echo (date("Y-m-d",$extendlist["estate_time"])); endif; ?>" style=" width:100px">
    <?php
 }else{ ?>
    <?php echo (date("Y-m-d",$extendlist["estate_time"])); ?>
    <?php
 } ?>
  </li>
  <li>银行代办:
  <?php
 if($extendlist['commission']=='' || $user_auth['roleid']==4){ ?>
    <input name="commission" type="radio" value="1" <?php if($extendlist['commission'] == '1'): ?>checked<?php endif; ?> class="kk">是
    <input name="commission" type="radio" value="2" <?php if($extendlist['commission'] == '2'): ?>checked<?php endif; ?> class="kk">否
  <?php
 }else{ ?>
  <?php echo ($extendlist['commission']=='1'?'是':'否'); ?>
  <?php
 } ?>
  </li>
  <li>备注:
  <?php
 if($extendlist['estate_remark']=='' || $user_auth['roleid']==4){ ?>
    <input type="text" name="estate_remark" id="estate_remark"  value="<?php echo ($extendlist["estate_remark"]); ?>" class="input-text kk" style=" width:400px">
    <?php
 }else{ ?>
    <?php echo ($extendlist["estate_remark"]); ?>
    <?php
 } ?>
  </li>
  </ul>
  </td>
  </tr>
    <?php
} else{ ?>
  <tr>
  <td width="120">不动产证</td>
  <td>
  <ul>
  <li>不动产证出件日期：<?php if($extendlist["estate_time"] != ''): echo (date("Y-m-d",$extendlist["estate_time"])); endif; ?></li>
  <li>银行代办：<?php if($extendlist['commission'] == 1): ?>是<?php endif; if($extendlist['commission'] == 2): ?>否<?php endif; ?></li>
  <li>备注：<?php echo ($extendlist["estate_remark"]); ?></li>
  </ul>
  </td>
  </tr>
  <?php
} } else{ ?>
 <tr>
  <td width="120">不动产证</td>
  <td>
  <ul>
  <li>不动产证出件日期：<?php if($extendlist["estate_time"] != ''): echo (date("Y-m-d",$extendlist["estate_time"])); endif; ?></li>
  <li>银行代办：<?php if($extendlist['commission'] == 1): ?>是<?php endif; if($extendlist['commission'] == 2): ?>否<?php endif; ?></li>
  <li>备注：<?php echo ($extendlist["estate_remark"]); ?></li>
  </ul>
  </td>
  </tr>
<?php
} ?>

  <?php
 if(strstr($user_auth['level'],"30") && $documentlist['state']!='2' && $chargelist['certificate_time']==''){ if(($user_auth['place']==$documentlist['place'] && $documentlist['turncity']=='0') || ($user_auth['place']==1 && ( $documentlist['turncity']=='1' || $documentlist['turncity']=='2') ) || strstr($user_auth['level'],"43")){ ?>
  <tr>
  <td width="120">公积金</td>
  <td>
  <ul>
  <li>公积金送审日期
    <?php
 if($accountlist['audit_time']=='' || $user_auth['roleid']==4){ ?>
    <input class="input-text kk" onClick="laydate()" name="account_audit_time" value="<?php if($accountlist["audit_time"] != ''): echo (date("Y-m-d",$accountlist["audit_time"])); endif; ?>" style=" width:100px">
    <?php
 }else{ ?>
    <?php echo (date("Y-m-d",$accountlist["audit_time"])); ?>
    <?php
 } ?>
  </li>
  <li>预计完成日期
    <?php
 if($accountlist['plan_time']=='' || $user_auth['roleid']==4){ ?>
    <input class="input-text kk" onClick="laydate()" name="account_plan_time" value="<?php if($accountlist["plan_time"] != ''): echo (date("Y-m-d",$accountlist["plan_time"])); endif; ?>" style=" width:100px">
    <?php
 }else{ ?>
    <?php echo (date("Y-m-d",$accountlist["plan_time"])); ?>
    <?php
 } ?>
  </li>
  </ul>
  <!-- <?php if($accountlist["real_time"] == '' or $user_auth['roleid'] == 4): ?>-->
  <ul class="clear">
    <?php if(is_array($reasonlist)): $i = 0; $__LIST__ = $reasonlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><?php if($vo["creat_time"] != ''): echo (date("Y-m-d",$vo["creat_time"])); endif; ?> 未通过原因：  <?php echo ($vo["content"]); ?>
        <?php
 if(strstr($user_auth['level'],"49")){ ?>
          <a onClick="article_edit('修改','<?php echo U('Index/reasonedit',array('id'=>$vo['reason_id']));?>',500,400)"  title="修改" style="color:red">修改</a>
          &nbsp;&nbsp;<a  onclick="article_del(this,'<?php echo ($vo["reason_id"]); ?>')" title="删除" style="color:red">删除</a>
          <?php
 } ?>
      </li><?php endforeach; endif; else: echo "" ;endif; ?>
    <li><textarea name="account_reason" cols="" rows="" class="textarea"  placeholder="请填写此次公积金未通过原因，若通过，请不要填写" style="width:600px;"></textarea></li>
  </ul>
  <!--<?php endif; ?> -->
  <ul>
    <li>实际完成日期
      <?php
 if($accountlist['real_time']=='' || $user_auth['roleid']==4){ ?>
      <input class="input-text kk" onClick="laydate()" name="account_real_time" value="<?php if($accountlist["real_time"] != ''): echo (date("Y-m-d",$accountlist["real_time"])); endif; ?>" style=" width:100px">
      <?php
 }else{ ?>
      <?php echo (date("Y-m-d",$accountlist["real_time"])); ?>
      <?php
 } ?>
    </li>
    <li>
        <input onClick="sendaudit(2)" id="sendaccountmessage" value="<?php if($accountlist["notice"] == '1'): ?>已通知中介<?php else: ?>通知中介<?php endif; ?>" class="btn btn-secondary radius" type="button">
     </li>
  </ul>
  </td>
  </tr>
  <?php
} else{ ?>
<tr>
  <td width="120">公积金</td>
  <td>
  <ul>
  <li>公积金送审日期：<?php if($accountlist["audit_time"] != ''): echo (date("Y-m-d",$accountlist["audit_time"])); endif; ?></li>
  <li>预计完成日期：<?php if($accountlist["plan_time"] != ''): echo (date("Y-m-d",$accountlist["plan_time"])); endif; ?></li>
  </ul>
   <ul class="clear">
  <?php if(is_array($reasonlist)): $i = 0; $__LIST__ = $reasonlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><?php if($vo["creat_time"] != ''): echo (date("Y-m-d",$vo["creat_time"])); endif; ?> 未通过原因：  <?php echo ($vo["content"]); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>
  <!-- <li><?php echo ($accountlist["reason"]); ?></li> -->
  </ul>
  <ul>
  <li>实际完成日期：<?php if($accountlist["real_time"] != ''): echo (date("Y-m-d",$accountlist["real_time"])); endif; ?></li>
  </ul>
  </td>
  </tr>
        <?php
} } else{ ?>
<tr>
  <td width="120">公积金</td>
  <td>
  <ul>
  <li>公积金送审日期：<?php if($accountlist["audit_time"] != ''): echo (date("Y-m-d",$accountlist["audit_time"])); endif; ?></li>
  <li>预计完成日期：<?php if($accountlist["plan_time"] != ''): echo (date("Y-m-d",$accountlist["plan_time"])); endif; ?></li>
  </ul>
   <ul class="clear">
  <?php if(is_array($reasonlist)): $i = 0; $__LIST__ = $reasonlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><?php if($vo["creat_time"] != ''): echo (date("Y-m-d",$vo["creat_time"])); endif; ?> 未通过原因：  <?php echo ($vo["content"]); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>
  <!-- <li><?php echo ($accountlist["reason"]); ?></li> -->
  </ul>
  <ul>
  <li>实际完成日期：<?php if($accountlist["real_time"] != ''): echo (date("Y-m-d",$accountlist["real_time"])); endif; ?></li>
  </ul>
  </td>
  </tr>
<?php
} ?>

<?php if($documentlist['supervise'] == '3'): if(strstr($user_auth['level'],"31") && $documentlist['state']!='2' && $chargelist['certificate_time']==''){ if(($user_auth['place']==$documentlist['area'] ) ||strstr($user_auth['level'],"43")){ ?>

<tr>
<td width="120">抵押</td>
<td>
<ul>
<?php
if(strstr($user_auth['level'],"45")){ ?>
<li>后场送前场时间：
  <?php
 if($mortgagelist['transfer_time']=='' || $user_auth['roleid']==4){ ?>
  <input class="input-text kk" onClick="laydate()" name="mortgage_transfer_time" id="mortgage_transfer_time"  value="<?php if($mortgagelist["transfer_time"] != ''): echo (date("Y-m-d",$mortgagelist["transfer_time"])); endif; ?>" style=" width:100px">
  <?php
 }else{ ?>
  <?php echo (date("Y-m-d",$mortgagelist["transfer_time"])); ?>
  <?php
 } ?>
</li>
<?php
}else{ ?>
<li>后场送前场时间：<?php if($mortgagelist["transfer_time"] != ''): echo (date("Y-m-d",$mortgagelist["transfer_time"])); endif; ?></li>
<?php
} ?>
<li>收件时间：
  <?php
 if($mortgagelist['get_time']=='' || $user_auth['roleid']==4){ ?>
  <input class="input-text kk" onClick="laydate()" name="mortgage_get_time" id="mortgage_get_time"  value="<?php if($mortgagelist["get_time"] != ''): echo (date("Y-m-d",$mortgagelist["get_time"])); endif; ?>" style=" width:100px">
  <?php
 }else{ ?>
  <?php echo (date("Y-m-d",$mortgagelist["get_time"])); ?>
  <?php
 } ?>
</li>
<li>未抵押原因：
  <?php
 if($mortgagelist['real_time']=='' || $user_auth['roleid']==4){ ?>
  <input type="text" name="mortgage_reason" id="mortgage_reason"  value="<?php echo ($mortgagelist["reason"]); ?>" class="input-text kk" style=" width:300px">
  <?php
 }else{ ?>
  <?php echo ($mortgagelist["reason"]); ?>
  <?php
 } ?>
</li>
<li>预计送抵押日期：
  <?php
 if($mortgagelist['plan_time']=='' || $user_auth['roleid']==4){ ?>
  <input class="input-text kk" onClick="laydate()" name="mortgage_plan_time" id="mortgage_plan_time"  value="<?php if($mortgagelist["plan_time"] != ''): echo (date("Y-m-d",$mortgagelist["plan_time"])); endif; ?>" style=" width:100px">
  <?php
 }else{ ?>
  <?php echo (date("Y-m-d",$mortgagelist["plan_time"])); ?>
  <?php
 } ?>
</li>
<li>实际抵押日期：
  <?php
 if($mortgagelist['real_time']=='' || $user_auth['roleid']==4){ ?>
  <input class="input-text kk" onClick="laydate()" name="mortgage_real_time" id="mortgage_real_time"  value="<?php if($mortgagelist["real_time"] != ''): echo (date("Y-m-d",$mortgagelist["real_time"])); endif; ?>" style=" width:100px">
  <?php
 }else{ ?>
  <?php echo (date("Y-m-d",$mortgagelist["real_time"])); ?>
  <?php
 } ?>
</li>
<li><input onClick="sendaudit(3)" id="sendmortgagemessage" value="<?php if($mortgagelist["notice"] == '0'): ?>通知中介<?php else: ?>已通知中介<?php endif; ?>" class="btn btn-secondary radius" type="button"></li>
</ul>
</td>
</tr>
<?php
} else{ ?>
<tr>
<td width="120">抵押</td>
<td>
<ul>
<li>后场送前场时间：<?php if($mortgagelist["transfer_time"] != ''): echo (date("Y-m-d",$mortgagelist["transfer_time"])); endif; ?></li>
<li>收件时间：<?php if($mortgagelist["get_time"] != ''): echo (date("Y-m-d",$mortgagelist["get_time"])); endif; ?></li>
<li>未抵押原因：<?php echo ($mortgagelist["reason"]); ?></li>
<li>预计送抵押日期：<?php if($mortgagelist["plan_time"] != ''): echo (date("Y-m-d",$mortgagelist["plan_time"])); endif; ?></li>
<li>实际抵押日期：<?php if($mortgagelist["real_time"] != ''): echo (date("Y-m-d",$mortgagelist["real_time"])); endif; ?></li>
</ul>
</td>
</tr>
<?php
} } else{ ?>
<tr>
<td width="120">抵押</td>
<td>
<ul>
<?php
if(strstr($user_auth['level'],"45") && $documentlist['state']!='2' && $chargelist['certificate_time']==''){ ?>
<li>后场送前场时间：
  <?php
 if($mortgagelist['transfer_time']=='' || $user_auth['roleid']==4){ ?>
  <input class="input-text kk" onClick="laydate()" name="mortgage_transfer_time" id="mortgage_transfer_time"  value="<?php if($mortgagelist["transfer_time"] != ''): echo (date("Y-m-d",$mortgagelist["transfer_time"])); endif; ?>" style=" width:100px">
  <?php
 }else{ ?>
  <?php echo (date("Y-m-d",$mortgagelist["transfer_time"])); ?>
  <?php
 } ?>
</li>
<?php
}else{ ?>
<li>后场送前场时间：<?php if($mortgagelist["transfer_time"] != ''): echo (date("Y-m-d",$mortgagelist["transfer_time"])); endif; ?></li>
<?php
} ?>
<li>收件时间：<?php if($mortgagelist["get_time"] != ''): echo (date("Y-m-d",$mortgagelist["get_time"])); endif; ?></li>
<li>未抵押原因：<?php echo ($mortgagelist["reason"]); ?></li>
<li>预计送抵押日期：<?php if($mortgagelist["plan_time"] != ''): echo (date("Y-m-d",$mortgagelist["plan_time"])); endif; ?></li>
<li>实际抵押日期：<?php if($mortgagelist["real_time"] != ''): echo (date("Y-m-d",$mortgagelist["real_time"])); endif; ?></li>
</ul>
</td>
</tr>
<?php
} ?>


<?php
if(strstr($user_auth['level'],"32")&& $documentlist['state']!='2' && $chargelist['certificate_time']==''){ if($user_auth['place']==$documentlist['area'] || strstr($user_auth['level'],"43")){ ?>
<tr>
<td width="120">他证</td>
<td>
<ul>
<li>出他证日期：
  <?php
 if($extendlist['else_time']=='' || $user_auth['roleid']=='4'){ ?>
  <input class="input-text kk" onClick="laydate()" name="else_time" id="else_time" value="<?php if($extendlist["else_time"] != ''): echo (date("Y-m-d",$extendlist["else_time"])); endif; ?>" style=" width:100px">
  <?php
 }else{ ?>
  <?php echo (date("Y-m-d",$extendlist["else_time"])); ?>
  <?php
 } ?>


</li>
<li>预计出他证日期：
  <?php
 if($extendlist['else_plan_time']=='' || $user_auth['roleid']=='4'){ ?>
  <input class="input-text kk" onClick="laydate()" name="else_plan_time" id="else_plan_time" value="<?php if($extendlist["else_plan_time"] != ''): echo (date("Y-m-d",$extendlist["else_plan_time"])); endif; ?>" style=" width:100px">
  <?php
 }else{ ?>
  <?php echo (date("Y-m-d",$extendlist["else_plan_time"])); ?>
  <?php
 } ?>
</li>
</ul>
</td>
</tr>
<?php
} else{ ?>
<tr>
<td width="120">他证</td>
<td>
<ul>
<li>出他证日期：<?php if($extendlist["else_time"] != ''): echo (date("Y-m-d",$extendlist["else_time"])); endif; ?></li>
<li>预计出他证日期：<?php if($extendlist["else_plan_time"] != ''): echo (date("Y-m-d",$extendlist["else_plan_time"])); endif; ?></li>
</ul>
</td>
</tr>
<?php
} } else{ ?>
<tr>
<td width="120">他证</td>
<td>
<ul>
<li>出他证日期：<?php if($extendlist["else_time"] != ''): echo (date("Y-m-d",$extendlist["else_time"])); endif; ?></li>
<li>预计出他证日期：<?php if($extendlist["else_plan_time"] != ''): echo (date("Y-m-d",$extendlist["else_plan_time"])); endif; ?></li>
</ul>
</td>
</tr>
<?php
} endif; ?>
  <?php
 if(strstr($user_auth['level'],"33") && $documentlist['state']!='2' && $chargelist['certificate_time']==''){ if(($user_auth['place']==$documentlist['place'] && $documentlist['turncity']=='0') || ($user_auth['place']==1 && ( $documentlist['turncity']=='1' || $documentlist['turncity']=='2') ) ||strstr($user_auth['level'],"43")){ ?>
  <tr>
  <td width="120">放款</td>
  <td>
  <ul>
  <li>送放款时间：
    <?php
 if($extendlist['credit_time']=='' || $user_auth['roleid']==4){ ?>
    <input class="input-text kk" onClick="laydate()" name="credit_time" id="credit_time"  value="<?php if($extendlist["credit_time"] != ''): echo (date("Y-m-d",$extendlist["credit_time"])); endif; ?>" style=" width:100px">
    <?php
 }else{ ?>
    <?php echo (date("Y-m-d",$extendlist["credit_time"])); ?>
    <?php
 } ?>
  </li>
  <li>实际放款时间：
    <?php
 if($documentlist['credit_real_time']=='' || $user_auth['roleid']==4){ ?>
    <input class="input-text kk" onClick="laydate()" name="credit_real_time" id="credit_real_time"  value="<?php if($documentlist["credit_real_time"] != ''): echo (date("Y-m-d",$documentlist["credit_real_time"])); endif; ?>" style=" width:100px">
    <?php
 }else{ ?>
    <?php echo (date("Y-m-d",$documentlist["credit_real_time"])); ?>
    <?php
 } ?>
  </li>
  <li>实际放款金额：
    <?php
 if($extendlist['credit_real_money']=='' || $user_auth['roleid']==4){ ?>
    <input type="text" name="credit_real_money" id="credit_real_money"  value="<?php echo ((isset($extendlist["credit_real_money"]) && ($extendlist["credit_real_money"] !== ""))?($extendlist["credit_real_money"]):''); ?>" class="input-text kk" style=" width:100px">万元
    <?php
 }else{ ?>
    <?php echo ($extendlist["credit_real_money"]); ?>万元
    <?php
 } ?>
  </li>
  <li>放款备注：
    <?php
 if($extendlist['credit_remark']=='' || $user_auth['roleid']==4){ ?>
    <input type="text" name="credit_remark" id="credit_remark"  value="<?php echo ($extendlist["credit_remark"]); ?>" class="input-text kk" style=" width:400px">
    <?php
 }else{ ?>
    <?php echo ($extendlist["credit_remark"]); ?>
    <?php
 } ?>
  </li>
  <li>
    <input onClick="sendaudit(4)" id="sendcreditmessage" value="<?php if($extendlist["agent_notice"] == '0'): ?>通知中介<?php else: ?>已通知中介<?php endif; ?>" class="btn btn-secondary radius" type="button">
  </li>
  <li>
      <?php if($documentlist['place'] == '3' or $documentlist['turncity'] == '1'): ?><input name="addressclient" value="1" type="radio">大厂杨新路5号鑫庭雅苑17幢108门面房<input name="addressclient" value="2"  type="radio">浦口区文昌路鑫海新寓15号门面房<?php endif; ?>
      <input onClick="sendaudit(5)" id="sendclientmessage" value="<?php if($extendlist["client_notice"] == '0'): ?>通知客户<?php else: ?>已通知客户<?php endif; ?>" class="btn btn-secondary radius" type="button"></li>
  </ul>
  </td>
  </tr>
  <?php
} else{ ?>
<tr>
  <td width="120">放款</td>
  <td>
  <ul>
  <li>送放款时间：<?php if($extendlist["credit_time"] != ''): echo (date("Y-m-d",$extendlist["credit_time"])); endif; ?></li>
  <li>实际放款时间：<?php if($documentlist["credit_real_time"] != ''): echo (date("Y-m-d",$documentlist["credit_real_time"])); endif; ?></li>
  <li>实际放款金额：<?php echo ($extendlist["credit_real_money"]); ?>万元</li>
  <li>放款备注：<?php echo ($extendlist["credit_remark"]); ?></li>
  </ul>
  </td>
  </tr>
  <?php
} } else{ ?>
<tr>
  <td width="120">放款</td>
  <td>
  <ul>
  <li>送放款时间：<?php if($extendlist["credit_time"] != ''): echo (date("Y-m-d",$extendlist["credit_time"])); endif; ?></li>
  <li>实际放款时间：<?php if($documentlist["credit_real_time"] != ''): echo (date("Y-m-d",$documentlist["credit_real_time"])); endif; ?></li>
  <li>实际放款金额：<?php echo ($extendlist["credit_real_money"]); ?>万元</li>
  <li>放款备注：<?php echo ($extendlist["credit_remark"]); ?></li>
  </ul>
  </td>
  </tr>
<?php
} ?>
  <!--收费-->
  <?php
 if(strstr($user_auth['level'],"34") && $documentlist['state']!='2'&& $chargelist['certificate_time']==''){ ?>
  <tr>
  <td width="120">收费</td>
  <td>
  <ul>
    <li>收费信息：
      <input type="text" name="charge_time" id="charge_time"  value="<?php echo ($chargelist["charge_time"]); ?>" class="input-text kk" style=" width:400px">
    </li>
  </ul>
  </td>
  </tr>
  <?php
 } else{ ?>
  <tr>
  <td width="120">收费</td>
  <td>
  <ul><li>收费信息：<?php echo ($chargelist["charge_time"]); ?></li></ul>
  </td>
  </tr>
  <?php
 } ?>
  <!--发证-->
  <?php
 if(strstr($user_auth['level'],"35") && $documentlist['state']!='2'&& $chargelist['certificate_time']==''){ ?>
  <tr><td width="120">发证</td>
  <td>
  <ul>
  <li>发证日期：
    <?php
 if($chargelist['certificate_time']=='' || $user_auth['roleid']==4){ ?>
    <input type="text" name="certificate2_time" id="certificate2_time"  onClick="laydate()" value="<?php if($chargelist["certificate_time"] != ''): echo (date("Y-m-d",$chargelist["certificate_time"])); endif; ?>" class="input-text kk" style=" width:200px">
    <?php
 }else{ ?>
    <?php echo (date("Y-m-d",$chargelist["certificate_time"])); ?>
    <?php
 } ?>
  </li>
  <li>潜在客户：
    <?php
 if($documentlist['latent']=='' || $user_auth['roleid']==4){ ?>
    <input name="latent" type="radio" value="1" <?php if($documentlist['latent'] == 1): ?>checked<?php endif; ?> class="kk">是<input name="latent" type="radio" value="2" <?php if($documentlist['latent'] == 2): ?>checked<?php endif; ?> class="kk">否
    <?php
 }else{ ?>
    <?php echo ($documentlist['latent']=='1'?'是':'否'); ?>
    <?php
 } ?>
  </li>
  </ul>
  </td>
  </tr>
  <?php
 } else{ ?>
  <tr><td width="120">发证</td>
  <td>
  <ul>
  <li>发证日期：<?php if($chargelist["certificate_time"] != ''): echo (date("Y-m-d",$chargelist["certificate_time"])); endif; ?></li>
  <li>潜在客户：<?php if($documentlist['latent'] == 1): ?>是<?php endif; if($documentlist['latent'] == 2): ?>否<?php endif; ?></li>
  </ul>
  </td>
  </tr>
    <?php
 } ?>
  <?php
 if(strstr($user_auth['level'],"35")||strstr($user_auth['level'],"34")||strstr($user_auth['level'],"33")||strstr($user_auth['level'],"32")||strstr($user_auth['level'],"31")||strstr($user_auth['level'],"30")||strstr($user_auth['level'],"29")||strstr($user_auth['level'],"28")||strstr($user_auth['level'],"27") || strstr($user_auth['level'],"26") ){ if($chargelist['certificate_time']=='' && $documentlist['state']!='2'){ ?>
  <tr>
  <td colspan="2" style="text-align:center"><input type="submit" value="保存"  class="btn btn-danger radius"></td>
  </tr>
  <?php
 }} ?>
 </table>
</form>


<script type="text/javascript" src="/Public/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/Public/lib/Validform/5.3.2/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="/Public/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="/Public/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/Public/static/h-ui.admin/js/H-ui.admin.js"></script>
  <script type="text/javascript">
  function sendaudit(type){
  	if(!type){
  		layer.msg('系统出错!')
  		return false;
  	}
    var phone = "<?php echo ($extendlist["agent_tel"]); ?>";
    var phone1 = "<?php echo ($extendlist["buy_phone"]); ?>";
    var username  = "<?php echo ($documentlist["buy_name"]); ?>";
    var doc_id  = "<?php echo ($documentlist["doc_id"]); ?>";
    var address = $("input[name=addressclient]").val();
    $.ajax({
      url:'<?php echo U("Index/sendmessage");?>',
      type:'post',
      data:{'phone':phone,'phone1':phone1,'type':type,'username':username,'doc_id':doc_id,'address':address},
      dataType:'json',
      success:function(data){
        if(data.ResultCode == '200'){
            layer.msg(data.ResultMessage);
        }
        else if(data.ResultCode == '500'){
            layer.msg(data.ResultMessage,{time:1000});
            return false;
        }
      }
	  });
  }
    function sendauditfalse(type){
    	if(!type){
    		layer.msg('系统出错!')
    		return false;
    	}
      var phone = "<?php echo ($extendlist["agent_tel"]); ?>";
      var username  = "<?php echo ($documentlist["buy_name"]); ?>";
      var doc_id  = "<?php echo ($documentlist["doc_id"]); ?>";
      var address = $("input[name=addressclient]").val();
      var falsecontent = $("textarea[name=reason]").val();
      $.ajax({
        url:'<?php echo U("Index/sendfalsemessage");?>',
        type:'post',
        data:{'phone':phone,'falsecontent':falsecontent,'type':type,'username':username,'doc_id':doc_id,address:address},
        dataType:'json',
        success:function(data){
          if(data.ResultCode == '200'){
              layer.msg(data.ResultMessage);
          }
          else if(data.ResultCode == '500'){
              layer.msg(data.ResultMessage,{time:1000});
              return false;
          }
        }
     });
    }

    function tuian(type){
      var index = parent.layer.getFrameIndex(window.name);
      var doc_id  = "<?php echo ($documentlist["doc_id"]); ?>";
      $.ajax({
        url:'<?php echo U("Index/tuiAn");?>',
        type:'post',
        data:{'docid':doc_id},
        dataType:'json',
        success:function(data){
          if(data.ResultCode == '200'){
            layer.msg(data.ResultMessage,{time:1000},function(){
                parent.window.location.reload()
                parent.layer.close(index);
            });
          }
          else if(data.ResultCode == '500'){
            layer.msg(data.ResultMessage,{time:1000});
            return false;
          }
        }
      });
    }

        function article_edit(title,url,w,h){
    	layer_show(title,url,w,h);
    }
    function article_del(obj,id){
    	layer.confirm('确认要删除吗？',function(index){
    		$.ajax({
    			url:'<?php echo U("Index/reasondel");?>',
    			type:'post',
    			data:{id:id},
    			dataType:'json',
    			success:function(data){
    				if(data.ResultCode == '200'){
    					$(obj).parents("li").remove();
    					layer.msg('已删除!',{icon:1,time:1000});
    				}
    				else if(data.ResultCode == '500'){
    						layer.msg(data.ResultMessage);
    				}
    			}
    		})

    	});
    }

    function huanyuan(obj,id){
    		$.ajax({
    			url:'<?php echo U("Index/huanyuan");?>',
    			type:'post',
    			data:{id:id},
    			dataType:'json',
    			success:function(data){
    				if(data.ResultCode == '200'){
              layer.msg('已还原!');
              parent.window.location.reload()
    				}
    				else if(data.ResultCode == '500'){
    						layer.msg(data.ResultMessage);
    				}
    			}
    		})
    }
</script>
<script type="text/javascript">
var index = parent.layer.getFrameIndex(window.name)
var res = 0;
var res1 =0;
	$(".registerform").Validform({
		tiptype:2,
		datatype:{
      "mobile":function(o,t){
        var regMobile=/^1[3,5,7,8]\d{9}$/;
        if(regMobile.test(o)){
          res1 = 1;
         return true;
        }
        res1 = 0;
         return false;
      },
			"idcard":function(gets,obj,curform,datatype){
				var Wi = [ 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1 ];// 加权因子;
				var ValideCode = [ 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2 ];// 身份证验证位值，10代表X;
				if (gets.length == 15) {
					if(isValidityBrithBy15IdCard(gets)){
            res = 1;
            return true;
          }
          else{
            res=0;
            return false;
          }
				}
        else if (gets.length == 18){
					var a_idCard = gets.split("");// 得到身份证数组
					if (isValidityBrithBy18IdCard(gets)&&isTrueValidateCodeBy18IdCard(a_idCard)) {
          res =1;
						return true;
					}
          res=0;
					return false;
				}
        else if(gets.length == 8 || gets.length == 9||gets.length == 10){
          if(checknumber(gets)){
             res =1;
            return true;
          }
          else{
            res=0;
            return false;
          }
        }
        res=0;
        return false;
				function isTrueValidateCodeBy18IdCard(a_idCard) {
					var sum = 0; // 声明加权求和变量
					if (a_idCard[17].toLowerCase() == 'x') {
						a_idCard[17] = 10;// 将最后位为x的验证码替换为10方便后续操作
					}
					for ( var i = 0; i < 17; i++) {
						sum += Wi[i] * a_idCard[i];// 加权求和
					}
					valCodePosition = sum % 11;// 得到验证码所位置
					if (a_idCard[17] == ValideCode[valCodePosition]) {
						return true;
					}
					return false;
				}
				function isValidityBrithBy18IdCard(idCard18){
					var year = idCard18.substring(6,10);
					var month = idCard18.substring(10,12);
					var day = idCard18.substring(12,14);
					var temp_date = new Date(year,parseFloat(month)-1,parseFloat(day));
					// 这里用getFullYear()获取年份，避免千年虫问题
					if(temp_date.getFullYear()!=parseFloat(year) || temp_date.getMonth()!=parseFloat(month)-1 || temp_date.getDate()!=parseFloat(day)){
						return false;
					}
					return true;
				}
				function isValidityBrithBy15IdCard(idCard15){
					var year =  idCard15.substring(6,8);
					var month = idCard15.substring(8,10);
					var day = idCard15.substring(10,12);
					var temp_date = new Date(year,parseFloat(month)-1,parseFloat(day));
					// 对于老身份证中的你年龄则不需考虑千年虫问题而使用getYear()方法
					if(temp_date.getYear()!=parseFloat(year) || temp_date.getMonth()!=parseFloat(month)-1 || temp_date.getDate()!=parseFloat(day)){
						return false;
					}
					return true;
				}
        function checknumber(number){
          var str=number;
          //在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
          var Expression=/^(1[45][0-9]{7})|G[0-9]{8}|P[0-9]{7}|S[0-9]{7,8}|D[0-9]{8}$/;
          var objExp=new RegExp(Expression);
          if(objExp.test(str)==true){
             return true;
          }else{
             return false;
          }
        }
			}
		}
	});


  $("#form-mortgage-alert").submit(function(){
    var card = $(".card").val();
    if(card){
      if(res!=1 || res1!=1){
        layer.msg('请正确填写');
        return false;
      }
    }

  $(".radius").attr('type','button');
        var roleid = "<?php echo ($user_auth["roleid"]); ?>";
        $.ajax({
          url:roleid==4?"<?php echo U('Index/adminEdit');?>":"<?php echo U('Index/alertmortgage');?>",
          type:'post',
          data:$('#form-mortgage-alert').serialize(),
          dataType:'json',
          success:function(data){
            if(data.ResultCode == '200'){
              layer.msg(data.ResultMessage,{time:1000},function(){
                  parent.window.location.reload()
                  parent.layer.close(index);
              });
            }
            else if(data.ResultCode == '500'){
                layer.msg(data.ResultMessage,{time:1000},function(){

                })
            }
          }
        })
        return false;
	});
	$('.one').blur(function(){
        if($(this).val()){
            if($('.two').val()){
                $('.three').val(parseFloat($(this).val()) + parseFloat($('.two').val()));
            }else{
                $('.three').val(parseFloat($(this).val()));
            }
        }else{
           $('.three').val(parseFloat($('.two').val()));
        }
    })
    $('.two').blur(function(){
        if($(this).val()){
            if($('.one').val()){
                $('.three').val(parseFloat($(this).val()) + parseFloat($('.one').val()));
            }else{
                $('.three').val(parseFloat($(this).val()));
            }
        }else{
           $('.three').val(parseFloat($('.one').val()));
        }
    })
</script>
<link href="/Public/dxk/icheck.css" rel="stylesheet">
<script src="/Public/dxk/icheck.js?v=1.0.2"></script>
              
                <script>
                    $(document).ready(function(){
                        $('.user-sex input').each(function(){
                            var self = $(this),
                                    label = self.next(),
                                    label_text = label.text();

                            label.remove();
                            self.iCheck({
                                checkboxClass: 'icheckbox_sm-blue',
                                radioClass: 'radio_sm-blue',
                                insert: label_text
                            });
                        });
                    });
                </script>
</body>
</html>